package com.ys.erp.entity.data.bean;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;

import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;

/**
 * @author system
 * @date 2024/12/19
 */

@Data
@TableName(value = "t_cs_shift_schedule")
public class CsShiftSchedule {
    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 班次类型：早班 MORNING   晚班 EVENING
     */
    @TableField(value = "type")
    private String type;

    /**
     * 开始时间
     */
    @TableField(value = "start_time")
    private String startTime;

    /**
     * 结束时间
     */
    @TableField(value = "end_time")
    private String endTime;

    /**
     * 操作员工id
     */
    @TableField(value = "emp_id")
    private Long empId;

    /**
     * 版本号
     */
    @TableField(value = "version")
    @Version
    private Integer version;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time", update = "now()")
    private LocalDateTime updateTime;

    @AllArgsConstructor
    @Getter
    public enum Enums {
        MORNING, EVENING;
    }

    public static final Map<String, String> ENUM_MAP = new HashMap<>();

    static {
        ENUM_MAP.put(Enums.MORNING.name(), "早班");
        ENUM_MAP.put(Enums.EVENING.name(), "晚班");
    }


}